3.4.15 \(\int \frac {x^4 (a+b \log (c (d+e x)^n))^2}{f+g x^2} \, dx\) [315]

3.4.15.1 Optimal result
3.4.15.2 Mathematica [C] (verified)
3.4.15.3 Rubi [A] (verified)
3.4.15.4 Maple [F]
3.4.15.5 Fricas [F]
3.4.15.6 Sympy [F(-1)]
3.4.15.7 Maxima [F]
3.4.15.8 Giac [F]
3.4.15.9 Mupad [F(-1)]

3.4.15.1 Optimal result

Integrand size = 29, antiderivative size = 701 \[ \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx=\frac {2 a b f n x}{g^2}-\frac {2 b^2 f n^2 x}{g^2}+\frac {2 b^2 d^2 n^2 x}{e^2 g}-\frac {b^2 d n^2 (d+e x)^2}{2 e^3 g}+\frac {2 b^2 n^2 (d+e x)^3}{27 e^3 g}-\frac {b^2 d^3 n^2 \log ^2(d+e x)}{3 e^3 g}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {2 b d^2 n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^3 g}+\frac {b d n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^3 g}-\frac {2 b n (d+e x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 e^3 g}+\frac {2 b d^3 n \log (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^3 g}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}+\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \operatorname {PolyLog}\left (2,\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}+d \sqrt {g}}\right )}{g^{5/2}}+\frac {b^2 (-f)^{3/2} n^2 \operatorname {PolyLog}\left (3,-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}-\frac {b^2 (-f)^{3/2} n^2 \operatorname {PolyLog}\left (3,\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}+d \sqrt {g}}\right )}{g^{5/2}} \]

output
2*a*b*f*n*x/g^2-2*b^2*f*n^2*x/g^2+2*b^2*d^2*n^2*x/e^2/g-1/2*b^2*d*n^2*(e*x 
+d)^2/e^3/g+2/27*b^2*n^2*(e*x+d)^3/e^3/g-1/3*b^2*d^3*n^2*ln(e*x+d)^2/e^3/g 
+2*b^2*f*n*(e*x+d)*ln(c*(e*x+d)^n)/e/g^2-2*b*d^2*n*(e*x+d)*(a+b*ln(c*(e*x+ 
d)^n))/e^3/g+b*d*n*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))/e^3/g-2/9*b*n*(e*x+d)^3 
*(a+b*ln(c*(e*x+d)^n))/e^3/g+2/3*b*d^3*n*ln(e*x+d)*(a+b*ln(c*(e*x+d)^n))/e 
^3/g+1/3*x^3*(a+b*ln(c*(e*x+d)^n))^2/g-f*(e*x+d)*(a+b*ln(c*(e*x+d)^n))^2/e 
/g^2+1/2*(-f)^(3/2)*(a+b*ln(c*(e*x+d)^n))^2*ln(e*((-f)^(1/2)-x*g^(1/2))/(e 
*(-f)^(1/2)+d*g^(1/2)))/g^(5/2)-1/2*(-f)^(3/2)*(a+b*ln(c*(e*x+d)^n))^2*ln( 
e*((-f)^(1/2)+x*g^(1/2))/(e*(-f)^(1/2)-d*g^(1/2)))/g^(5/2)-b*(-f)^(3/2)*n* 
(a+b*ln(c*(e*x+d)^n))*polylog(2,-(e*x+d)*g^(1/2)/(e*(-f)^(1/2)-d*g^(1/2))) 
/g^(5/2)+b*(-f)^(3/2)*n*(a+b*ln(c*(e*x+d)^n))*polylog(2,(e*x+d)*g^(1/2)/(e 
*(-f)^(1/2)+d*g^(1/2)))/g^(5/2)+b^2*(-f)^(3/2)*n^2*polylog(3,-(e*x+d)*g^(1 
/2)/(e*(-f)^(1/2)-d*g^(1/2)))/g^(5/2)-b^2*(-f)^(3/2)*n^2*polylog(3,(e*x+d) 
*g^(1/2)/(e*(-f)^(1/2)+d*g^(1/2)))/g^(5/2)
 
3.4.15.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 1.01 (sec) , antiderivative size = 821, normalized size of antiderivative = 1.17 \[ \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx=\frac {-54 e^3 f \sqrt {g} x \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2+18 e^3 g^{3/2} x^3 \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2+54 e^3 f^{3/2} \arctan \left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2+6 b n \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right ) \left (-18 e^2 f \sqrt {g} (d+e x) (-1+\log (d+e x))+g^{3/2} \left (e x \left (-6 d^2+3 d e x-2 e^2 x^2\right )+6 \left (d^3+e^3 x^3\right ) \log (d+e x)\right )+9 i e^3 f^{3/2} \left (\log (d+e x) \log \left (1-\frac {\sqrt {g} (d+e x)}{-i e \sqrt {f}+d \sqrt {g}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {g} (d+e x)}{-i e \sqrt {f}+d \sqrt {g}}\right )\right )-9 i e^3 f^{3/2} \left (\log (d+e x) \log \left (1-\frac {\sqrt {g} (d+e x)}{i e \sqrt {f}+d \sqrt {g}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {g} (d+e x)}{i e \sqrt {f}+d \sqrt {g}}\right )\right )\right )+b^2 n^2 \left (-54 e^2 f \sqrt {g} \left (2 e x-2 (d+e x) \log (d+e x)+(d+e x) \log ^2(d+e x)\right )+g^{3/2} \left (e x \left (66 d^2-15 d e x+4 e^2 x^2\right )-6 \left (11 d^3+6 d^2 e x-3 d e^2 x^2+2 e^3 x^3\right ) \log (d+e x)+18 \left (d^3+e^3 x^3\right ) \log ^2(d+e x)\right )+27 i e^3 f^{3/2} \left (\log ^2(d+e x) \log \left (1-\frac {\sqrt {g} (d+e x)}{-i e \sqrt {f}+d \sqrt {g}}\right )+2 \log (d+e x) \operatorname {PolyLog}\left (2,\frac {\sqrt {g} (d+e x)}{-i e \sqrt {f}+d \sqrt {g}}\right )-2 \operatorname {PolyLog}\left (3,\frac {\sqrt {g} (d+e x)}{-i e \sqrt {f}+d \sqrt {g}}\right )\right )-27 i e^3 f^{3/2} \left (\log ^2(d+e x) \log \left (1-\frac {\sqrt {g} (d+e x)}{i e \sqrt {f}+d \sqrt {g}}\right )+2 \log (d+e x) \operatorname {PolyLog}\left (2,\frac {\sqrt {g} (d+e x)}{i e \sqrt {f}+d \sqrt {g}}\right )-2 \operatorname {PolyLog}\left (3,\frac {\sqrt {g} (d+e x)}{i e \sqrt {f}+d \sqrt {g}}\right )\right )\right )}{54 e^3 g^{5/2}} \]

input
Integrate[(x^4*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x^2),x]
 
output
(-54*e^3*f*Sqrt[g]*x*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2 + 18* 
e^3*g^(3/2)*x^3*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2 + 54*e^3*f 
^(3/2)*ArcTan[(Sqrt[g]*x)/Sqrt[f]]*(a - b*n*Log[d + e*x] + b*Log[c*(d + e* 
x)^n])^2 + 6*b*n*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])*(-18*e^2*f* 
Sqrt[g]*(d + e*x)*(-1 + Log[d + e*x]) + g^(3/2)*(e*x*(-6*d^2 + 3*d*e*x - 2 
*e^2*x^2) + 6*(d^3 + e^3*x^3)*Log[d + e*x]) + (9*I)*e^3*f^(3/2)*(Log[d + e 
*x]*Log[1 - (Sqrt[g]*(d + e*x))/((-I)*e*Sqrt[f] + d*Sqrt[g])] + PolyLog[2, 
 (Sqrt[g]*(d + e*x))/((-I)*e*Sqrt[f] + d*Sqrt[g])]) - (9*I)*e^3*f^(3/2)*(L 
og[d + e*x]*Log[1 - (Sqrt[g]*(d + e*x))/(I*e*Sqrt[f] + d*Sqrt[g])] + PolyL 
og[2, (Sqrt[g]*(d + e*x))/(I*e*Sqrt[f] + d*Sqrt[g])])) + b^2*n^2*(-54*e^2* 
f*Sqrt[g]*(2*e*x - 2*(d + e*x)*Log[d + e*x] + (d + e*x)*Log[d + e*x]^2) + 
g^(3/2)*(e*x*(66*d^2 - 15*d*e*x + 4*e^2*x^2) - 6*(11*d^3 + 6*d^2*e*x - 3*d 
*e^2*x^2 + 2*e^3*x^3)*Log[d + e*x] + 18*(d^3 + e^3*x^3)*Log[d + e*x]^2) + 
(27*I)*e^3*f^(3/2)*(Log[d + e*x]^2*Log[1 - (Sqrt[g]*(d + e*x))/((-I)*e*Sqr 
t[f] + d*Sqrt[g])] + 2*Log[d + e*x]*PolyLog[2, (Sqrt[g]*(d + e*x))/((-I)*e 
*Sqrt[f] + d*Sqrt[g])] - 2*PolyLog[3, (Sqrt[g]*(d + e*x))/((-I)*e*Sqrt[f] 
+ d*Sqrt[g])]) - (27*I)*e^3*f^(3/2)*(Log[d + e*x]^2*Log[1 - (Sqrt[g]*(d + 
e*x))/(I*e*Sqrt[f] + d*Sqrt[g])] + 2*Log[d + e*x]*PolyLog[2, (Sqrt[g]*(d + 
 e*x))/(I*e*Sqrt[f] + d*Sqrt[g])] - 2*PolyLog[3, (Sqrt[g]*(d + e*x))/(I*e* 
Sqrt[f] + d*Sqrt[g])])))/(54*e^3*g^(5/2))
 
3.4.15.3 Rubi [A] (verified)

Time = 1.21 (sec) , antiderivative size = 701, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2863, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx\)

\(\Big \downarrow \) 2863

\(\displaystyle \int \left (\frac {f^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2 \left (f+g x^2\right )}-\frac {f \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2}+\frac {x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 b d^3 n \log (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^3 g}-\frac {2 b d^2 n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^3 g}+\frac {b d n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^3 g}-\frac {2 b n (d+e x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 e^3 g}-\frac {b (-f)^{3/2} n \operatorname {PolyLog}\left (2,-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^{5/2}}+\frac {b (-f)^{3/2} n \operatorname {PolyLog}\left (2,\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+e \sqrt {-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^{5/2}}+\frac {(-f)^{3/2} \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{d \sqrt {g}+e \sqrt {-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g^{5/2}}-\frac {(-f)^{3/2} \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g^{5/2}}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac {2 a b f n x}{g^2}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b^2 d^3 n^2 \log ^2(d+e x)}{3 e^3 g}+\frac {2 b^2 d^2 n^2 x}{e^2 g}-\frac {b^2 d n^2 (d+e x)^2}{2 e^3 g}+\frac {2 b^2 n^2 (d+e x)^3}{27 e^3 g}+\frac {b^2 (-f)^{3/2} n^2 \operatorname {PolyLog}\left (3,-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}-\frac {b^2 (-f)^{3/2} n^2 \operatorname {PolyLog}\left (3,\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+e \sqrt {-f}}\right )}{g^{5/2}}-\frac {2 b^2 f n^2 x}{g^2}\)

input
Int[(x^4*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x^2),x]
 
output
(2*a*b*f*n*x)/g^2 - (2*b^2*f*n^2*x)/g^2 + (2*b^2*d^2*n^2*x)/(e^2*g) - (b^2 
*d*n^2*(d + e*x)^2)/(2*e^3*g) + (2*b^2*n^2*(d + e*x)^3)/(27*e^3*g) - (b^2* 
d^3*n^2*Log[d + e*x]^2)/(3*e^3*g) + (2*b^2*f*n*(d + e*x)*Log[c*(d + e*x)^n 
])/(e*g^2) - (2*b*d^2*n*(d + e*x)*(a + b*Log[c*(d + e*x)^n]))/(e^3*g) + (b 
*d*n*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n]))/(e^3*g) - (2*b*n*(d + e*x)^3* 
(a + b*Log[c*(d + e*x)^n]))/(9*e^3*g) + (2*b*d^3*n*Log[d + e*x]*(a + b*Log 
[c*(d + e*x)^n]))/(3*e^3*g) + (x^3*(a + b*Log[c*(d + e*x)^n])^2)/(3*g) - ( 
f*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/(e*g^2) + ((-f)^(3/2)*(a + b*Log 
[c*(d + e*x)^n])^2*Log[(e*(Sqrt[-f] - Sqrt[g]*x))/(e*Sqrt[-f] + d*Sqrt[g]) 
])/(2*g^(5/2)) - ((-f)^(3/2)*(a + b*Log[c*(d + e*x)^n])^2*Log[(e*(Sqrt[-f] 
 + Sqrt[g]*x))/(e*Sqrt[-f] - d*Sqrt[g])])/(2*g^(5/2)) - (b*(-f)^(3/2)*n*(a 
 + b*Log[c*(d + e*x)^n])*PolyLog[2, -((Sqrt[g]*(d + e*x))/(e*Sqrt[-f] - d* 
Sqrt[g]))])/g^(5/2) + (b*(-f)^(3/2)*n*(a + b*Log[c*(d + e*x)^n])*PolyLog[2 
, (Sqrt[g]*(d + e*x))/(e*Sqrt[-f] + d*Sqrt[g])])/g^(5/2) + (b^2*(-f)^(3/2) 
*n^2*PolyLog[3, -((Sqrt[g]*(d + e*x))/(e*Sqrt[-f] - d*Sqrt[g]))])/g^(5/2) 
- (b^2*(-f)^(3/2)*n^2*PolyLog[3, (Sqrt[g]*(d + e*x))/(e*Sqrt[-f] + d*Sqrt[ 
g])])/g^(5/2)
 

3.4.15.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2863
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_)) 
^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a 
 + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a, b, c 
, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]
 
3.4.15.4 Maple [F]

\[\int \frac {x^{4} {\left (a +b \ln \left (c \left (e x +d \right )^{n}\right )\right )}^{2}}{g \,x^{2}+f}d x\]

input
int(x^4*(a+b*ln(c*(e*x+d)^n))^2/(g*x^2+f),x)
 
output
int(x^4*(a+b*ln(c*(e*x+d)^n))^2/(g*x^2+f),x)
 
3.4.15.5 Fricas [F]

\[ \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2} x^{4}}{g x^{2} + f} \,d x } \]

input
integrate(x^4*(a+b*log(c*(e*x+d)^n))^2/(g*x^2+f),x, algorithm="fricas")
 
output
integral((b^2*x^4*log((e*x + d)^n*c)^2 + 2*a*b*x^4*log((e*x + d)^n*c) + a^ 
2*x^4)/(g*x^2 + f), x)
 
3.4.15.6 Sympy [F(-1)]

Timed out. \[ \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx=\text {Timed out} \]

input
integrate(x**4*(a+b*ln(c*(e*x+d)**n))**2/(g*x**2+f),x)
 
output
Timed out
 
3.4.15.7 Maxima [F]

\[ \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2} x^{4}}{g x^{2} + f} \,d x } \]

input
integrate(x^4*(a+b*log(c*(e*x+d)^n))^2/(g*x^2+f),x, algorithm="maxima")
 
output
1/3*a^2*(3*f^2*arctan(g*x/sqrt(f*g))/(sqrt(f*g)*g^2) + (g*x^3 - 3*f*x)/g^2 
) + integrate((b^2*x^4*log((e*x + d)^n)^2 + 2*(b^2*log(c) + a*b)*x^4*log(( 
e*x + d)^n) + (b^2*log(c)^2 + 2*a*b*log(c))*x^4)/(g*x^2 + f), x)
 
3.4.15.8 Giac [F]

\[ \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2} x^{4}}{g x^{2} + f} \,d x } \]

input
integrate(x^4*(a+b*log(c*(e*x+d)^n))^2/(g*x^2+f),x, algorithm="giac")
 
output
integrate((b*log((e*x + d)^n*c) + a)^2*x^4/(g*x^2 + f), x)
 
3.4.15.9 Mupad [F(-1)]

Timed out. \[ \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx=\int \frac {x^4\,{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2}{g\,x^2+f} \,d x \]

input
int((x^4*(a + b*log(c*(d + e*x)^n))^2)/(f + g*x^2),x)
 
output
int((x^4*(a + b*log(c*(d + e*x)^n))^2)/(f + g*x^2), x)